package com.hades.example.java.refactoring.before.c10.c10_14_replace_error_code_with_exception;

public class Account {
    int _balance = 5;

    int withdraw(int amount) {
        if (amount > _balance) {
            return -1;
        } else {
            _balance -= amount;
            return 0;
        }
    }
}